#!/usr/bin/env bash

curl -X POST -H "Content-Type:application/json" \
-d '{"physicalDeviceId": "865046100020003004600000173cb11b04ac"}' \
"http://ac-new-warehouse:5814/ac-julink-warehouse/getPublicKey"


curl -X POST -H "Content-Type:application/json" \
-d '{"physicalDeviceId": "865046100020003004600000173cb11b0463"}' \
"http://localhost:5814/ac-julink-warehouse/getPublicKey"

curl -X POST -H "Content-Type:application/json" \
-d '{"token":"9dc7bb389c874395bbc0173f713458b9"}' \
"http://ac-new-ps:9096/ac-julink-ps/verify"

curl -X POST -H "Content-Type:application/json" \
-d '{"wifi_id":"86500110001000100010000010b5bc926678"}' \
"http://ac-new-ps:9096/ac-julink-ps/certify"

curl -X POST -H "Content-Type:application/json" \
-d '{"cbcEnable":true,"wifiId":"86500110001000100010000010b5bc926678"}' \
"http://ac-new-warehouse:5814/ac-julink-warehouse/getCipheredDKey"

curl -X POST -H "Content-Type:application/json" \
-d '{"wifiId":"8650401000100010040000000e4eeeeeeeee"}' \
"http://localhost:5814/ac-julink-warehouse/authBatch"

curl -X POST -H "Content-Type:application/json" \
-d '{"batchCode":"20231017022741673-865001100010001000100000", "domainId": "16"}' \
"http://ac-new-warehouse:5814/ac-julink-warehouse/checkBatchCodeCount"

curl -X POST -H "Content-Type:application/json" \
-d '{"domain": "16", "subDomain": "35", "batchCode": "edwin1987", "devices": [{"wifiId": "86500910005000400060000012ee493030fb", "publicKey": "fdfcca4c22808e4e756aacb08de2a27a"}]}' \
"http://ac-new-warehouse:5814/ac-julink-warehouse/registerDevices"

######## basic-data
curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId":"16", "subDomainId": "187"}' \
"http://ac-new-warehouse:5814/basic-data/getDeviceBySubDomain"


curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId": "16", "subDomainId" : "187"}' \
"http://ac-new-warehouse:5814/basic-data/getInfoTotal"

######## ac-platform
curl -X POST -H "Content-Type:application/json" \
-d '{"developerId":"1"}' \
"http://ac-new-warehouse:5814/ac-platform/getKeyPairs"

curl -X POST -H "Content-Type:application/json" \
-d '{"developerId":"1", "status": "0", "permission": "rw"}' \
"http://ac-new-warehouse:5814/ac-platform/createKeyPair"

curl -X POST -H "Content-Type:application/json" \
-d '{"developerId":"27", "accessKey": "f0d1112f401045389fcd70034a471992", "enable": false}' \
"http://ac-new-warehouse:5814/ac-platform/enableKeyPair"

curl -X POST -H "Content-Type:application/json" \
-d '{"developerId":"27", "accessKey": "f0d1112f401045389fcd70034a471992"}' \
"http://ac-new-warehouse:5814/ac-platform/deleteKeyPair"

curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId":"16"}' \
"http://ac-new-warehouse:5814/ac-platform/getDeveloperByMajorDomainId"


curl -X POST -H "Content-Type:application/json" \
-d '{"developerId":"9", "name": "d123", "description": "Holy"}' \
"http://ac-new-warehouse:5814/ac-platform/createProject"

8650401000100010040000000e4c844a3e02
8650401000100010040000000e4eeeeeeeee
